package com.eapi.project.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.eapi.eapicommom.model.entity.User;
import com.eapi.project.common.BaseResponse;
import com.eapi.project.common.ErrorCode;
import com.eapi.project.exception.BusinessException;
import com.eapi.project.model.dto.team.*;
import com.eapi.project.model.entity.Team;
import com.baomidou.mybatisplus.extension.service.IService;
import com.eapi.project.model.enums.TeamStatusEnum;
import com.eapi.project.model.vo.TeamUserVO;
import org.apache.dubbo.common.utils.StringUtils;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;
import java.util.Optional;

/**
* @author 59966
* @description 针对表【team(队伍)】的数据库操作Service
* @createDate 2024-06-17 23:34:01
*/
public interface TeamService extends IService<Team> {

    /**
     * 根据标签搜索队伍
     *
     * @param tagNameList 队伍要拥有的标签
     *
     */
    public List<Team> searchTeamsByTags(List<String> tagNameList);

    public Long addTeam(TeamAddRequest teamAddRequest, User loginUser);

    List<TeamUserVO> listTeams(TeamQueryRequest teamQueryRequest, User LoginUser);

    boolean updateTeam(TeamUpdateRequest teamUpdateRequest, User loginUser);

    Boolean joinTeam(TeamJoinRequest teamJoinRequest, User loginUser);

    Boolean quitTeam(TeamQuitRequest teamQuitRequest, User loginUser);

    boolean deleteTeam(Long teamId, User loginUser);
}
